package com.yc.feign;

import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

@FeignClient(name = "service-generateId")  //feign客户端 值就是想要远程调用的微服务名字 feign自己会给services-hello发送请求，当然services-hello在哪 feign自己连上注册中心去找到地址而且负载均衡地挑一个
//@LoadBalancerClient(name = "service-generateId")
public interface GenerateIdFeignClient {
    //mvc注解的两套使用逻辑：①在controller层是接受请求  ②在feignclient上是发送请求
    @GetMapping ("/generate")
    String  generateId();
}
